package com.yangjie.autotest.hpsa.context;

import java.util.Calendar;

import javax.inject.Inject;

import com.yangjie.autotest.context.ContextIF;
import com.yangjie.autotest.hpsa.HPSAService;
import com.yangjie.autotest.testcase.PreTestCaseProcessor;
import com.yangjie.autotest.testcase.xml.TestCase;


public class HPSAPreTestCaseProcessor implements PreTestCaseProcessor {
	
	
	@Inject
	HPSAService hpsaService = null;
	@Override
	public void preTestCase(ContextIF testcaseContext, TestCase testCase) {
		// TODO Auto-generated method stub
		testcaseContext.setProperty(HPSAContextProperty.START_DATE_OF_TEST_CASE, Calendar.getInstance().getTime());
		testcaseContext.setProperty(HPSAContextProperty.MAX_PS_ID_BEFORE_TEST_CASE, hpsaService.getCurrentMaxOrderId());
		testcaseContext.setProperty(HPSAContextProperty.MAX_AUDIT_ID_BEFORE_TEST_CASE, hpsaService.getCurrentMaxAuditId());
	}
	
	
}
